/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-16 15:03:11
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-08-02 12:59:10
 * @FilePath: \grazlink20\uc_sys\src\api\fa\earcon\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 * 接口
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 分栏列表
export const spEnclosureListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureList',
      data: data
    }
  })
}

// 分栏新增
export const spEnclosureAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureAddAdmin',
      data: data
    }
  })
}

// 分栏查看
export const spEnclosureSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureSee',
      data: data
    }
  })
}

// 分栏修改
export const spEnclosureEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureEdit',
      data: data
    }
  })
}
// 分栏删除
export const spEnclosureDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureDel',
      data: data
    }
  })
}

// 出入栏记录单新增
export const spEnclosureLogOrderAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderAddAdmin',
      data: data
    }
  })
}
// 出入栏记录单删除
export const spEnclosureLogOrderDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderDel',
      data: data
    }
  })
}

// 出入栏记录单列表
export const spEnclosureLogOrderListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderList',
      data: data
    }
  })
}

// 出入栏记录单查看
export const spEnclosureLogOrderSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderSee',
      data: data
    }
  })
}

// 出入栏记录单编辑
export const spEnclosureLogOrderEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderEdit',
      data: data
    }
  })
}

// 出入栏记录单明细
export const spEnclosureLogOrderDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderDetailedList',
      data: data
    }
  })
}

// 出入栏记录单归档
export const spEnclosureLogOrderEndApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureLogOrderEnd',
      data: data
    }
  })
}

// 出入栏单个资产明细列表
export const spEnclosureSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureSingleDetailedList',
      data: data
    }
  })
}
